<!-- Dom模板 -->
<template>
  <div class="orderBox">
    <!-- Dom内容 -->
    <div class="top">
      <div>
        <i class="iconfont">&#xe641;</i>
      </div>
      <div class="num">
        <h3>社区服务</h3>
      </div>
      <div class="iconList">
        <i class="iconfont">&#xe6d3;</i> | <i class="iconfont">&#xe501;</i>
      </div>
    </div>
    <div class="timer">
      <i class="iconfont sousuo">&#xe623;</i>
      <input type="text" placeholder="团餐关键词搜索 姓名 手机号" />
    </div>
    <ul class="nav">
      <li v-for="(item, i) in data" :key="i" :class="nowIndex===i?'liActive':''" @click="(btn(item,i))">
        {{ item }}
      </li>
    </ul>
    <div class="imglist">
      <img src="../../../../static/img/12.png" alt="" />
      <p>很抱歉，你还没有相关订单</p>
    </div>
  </div>
</template>

<script>
// import a from './a'; // 引入组件
export default {
  name: "",
  data() {
    return {
      msg: "测试",
      data: ["待配送", "分发件", "退款单", "已完成"],
      nowIndex:0
    };
  },
  // 生命周期 - 创建完成（访问当前this实例）
  created() {},
  // 生命周期 - 挂载完成（访问DOM元素）
  mounted() {},
  // Vue方法定义
  methods: {
    btn(item,i){
      this.nowIndex=i
    }
  },
};
</script>

<style scoped>
@import url("../../../assets/fonts1/iconfont.css");
.orderBox {
  width: 100%;
  height:100%;
  padding: 0 10px;
  overflow: auto;
}
.top {
  width: 100%;
  height: 30px;
  line-height: 30px;
  margin-top: 10px;
  /* background: #ccc; */
  display: flex;
  justify-content: space-between;
}
.next {
  margin-left: 5px;
}
.iconList {
  width: 100px;
  height: 30px;
  background: grey;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
  text-align: center;
}
h3 {
  margin-left: 60px;
}
.timer {
  text-align: center;
  margin-top: 20px;
}
input {
  width: 300px;
  height: 40px;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
  outline: none;
  background: white;
  text-align: center;
  position: relative;
  border: 1px solid #cccc;
  color: #ccc;
}
.sousuo {
  position: absolute;
  left: 80px;
  top: 70px;
  z-index: 1;
}
.nav{
  width: 100%;
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
}
li{
  color: #ccc;
}
.liActive{
  color: #000;
  font-weight: 600;
}
.imglist{
  text-align: center;
  margin-top: 150px;
}
p{
  margin-top: 40px;
  color: #ccc;
}
</style>